﻿<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<title></title>

<script>
	onload = function(){
		var box = document.getElementById("box");
		document.onclick = function(evt){
			
			var e = evt || event;
			
			box.style.left = e.clientX + "px";
			box.style.top = e.clientY + document.body.scrollTop + "px";
			
		}
	}
</script>
</head>
<body>
	<div id="box" style="position:absolute; left:0; top:0; width:200px;height:200px;background:red"></div>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
	<p>aaa</p>
</body>
</html>